home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
c
/
snz128s
/
doc
/
snews.doc
< prev
next >
Wrap
Text File
|
1994-06-18
|
26KB
|
623 lines
This file is provided for completeness. It is part of the
distribution of Snews 1.90, the version that is available on the NET.
The DEMON version of Snews has undergone many changes since this
version of Snews was written. It should not be taken as definitive
documentation for Snews 2.0 (DIS 1.23).
Please read the document COMMANDS.DOC as this is the definitive
definition of the commands in the Demon version of Snews.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simple NEWS 1.90à
=================
SNEWS 1.0 (to version 1.12) was written by John McCombs
SNEWS 1.90 was re-coded by two people who don't want to be bothered
any more.
INTRODUCTION TO VERSION 1.90
============================
This is an alpha release of SNEWS version 1.90. Snews is currently
under upgrading to add several features. This release is purely for
those people currently using version 1.12 of SNews and who are having
problems with a few of the bugs (most notably the "out of memory" bug
when exiting threads using <ESC>).
Note: This document is basically the SNEWS 1.0 documentation. All new
additions to Snews as of version 1.90, as documented, are denoted by an
asterisk "*".
Please see the section at the end of this file "SNEWS 1.90
ADDITIONS" for specific information that differs from previous
versions of SNEWS.
INTRODUCTION
============
'Simple NEWS' is an news add-on for KA9Q. It is intended for use as a
leaf node and offers:
- Threaded news reading. This allows you to be much more
selective about what you read, enabling you to cover many more
newsgroups.
* Using the right and left arrow keys, threads can be traversed
forward and backwards now.
- That when a cross-posted article is read the news-reader marks all
the other instances of the article as read too.
- Separate rc files are kept for each user, which record the individual
articles that you have seen. This is in contrast to some readers
which simply record the highest article number read. The user is
defined, as for mail users, in the file pointed to by the UUPCUSRRC
environment variable.
* As of SNEWS 1.90à, all personal USER variables are kept in
the SNEWS.RC file. The program no longer uses UUPC's
PERSONAL.RC file.
- Usual range of response facilities: follow-up news, reply by mail,
forward by mail, save article/thread to disk.
* A new feature is the EXTRACT function (key "w"). It saves
articles in the KA9Q mailbox format. Thus, extracted news articles
can be read later at the user's convenience.
NOTE: By default these extracted msgs are saved to the file
"SNEWSEX.TXT" in the ka9q mail directory. The name of this file
can be set in the SNEWS.RC file.
- Articles are now stored in one file per newsgroup, rather than
one file per article. This results in an enormous saving (up to 3:1)
in disk space on disks with with a default cluster size of 4kb per
cluster.
- Processing of batched/compressed news. Unbatched and uncompressed
are not processed. Control messages are not processed.
- Posting - Posts are unbatched and uncompressed. You can only post
to your 'mailserv'. You cannot feed another site. Posting can only
be done from within the news reader SNEWS. If you are looking for
something to feed other sites why not try Waffle?
- 'Received date' oriented expire to maintain the news database.
I looked at porting Tass and wnews, but in the end decided they were
far more effort than it was worth, as these news systems were more
complicated than was necessary for a single user (at a time) dos
implementation. Especially when the PC is likely to be a leaf node.
Generally the algorithms used are simple, but the speed is adequate
for a feed for several users, expiring after 5-10 days. The main
bottleneck occurs during the 'expire' operation, which must rewrite
the entire news database.
'Simple NEWS' was built rather quickly (and it shows in places :-) to
suit my own needs. I'm distributing it in the hope you might find it
useful.
[Posting is a bit of a kludge. The outgoing message is converted
into a mail message which is then sent to your local gateway when
you next connect to it with KA9Q. You need to make sure that your
IP gateway can gate to news before posting.]
Requirements
------------
- A minimum of PC-XT, 640k RAM, plenty free. The uncompress
is the hungry bit. If you use a lot of TSR's, you could get
around this by having your feed use 12 bit compression.
- Several megabytes of disk depending on size of the feed.
In NZ the 100 groups in my active file runs at about 45MB/month. So
you need to turn it over reasonably quickly.
- You must have installed KA9Q. In particular, you need KA9Q
version "1229 (gt 1.4)" or later. Versions of KA9Q without the
"(gt x.x)" signature will not work with this version of snews
without changes to "nntpcli.c". Copies of the modified KA9Q are
obtainable via mail from "gt@demon.co.uk", or by anonymous FTP from
pub/ibmpc/dis on gate.demon.co.uk.
The sources compile under Borland's BC++, but I imagine you
should be able to compile it under earlier versions of TC and port it
to other MS-DOS ANSI C compilers without much trouble.
Support
-------
I don't want to be *deluged* with complaints, bug reports, or suggestions
for improvements. I can think of enough of these for myself, :-). And
no whining about the dodgy processing of the headers. This will be
fixed sometime.
If you have a problem, please try hard to solve it before you contact
me. If you find a bug let me know. Unless a bug absolutely cripples
you, you'll have to wait for the next release. This policy arises
largely out of the fact that email costs me $$$.
Support requests for any snews versions containing the letters "DIS"
in the version number should be addressed to internet@demon.net rather
than John McCombs. John McCombs is not responsible for the changes
made to snews to make it cooperate with ka9q.
There is a 'B' option in Snews 1.23 and later which presents a
pro-forma for completion of a bug report to the support team.
Snews is currently being supported by malcolm@muir.demon.co.uk
Caveats & Copyright
-------------------
Version 1.12 of this software is copyright (1991) by John McCombs,
Christchurch, New Zealand.
This package is free software, but NOT public domain; you can
redistribute it and/or modify it under the terms of the GNU
General Public License, version 1, as published by the Free Software
Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See the file COPYING, which contains a copy of the GNU General
Public License.
The compress included here was not written by me, and is to the best
of my knowledge in the public domain. Any unix compatible compress may
be used.
Acknowledgments
---------------
I'd like to thank Steve Kohlenberger, of PreSoft Architects, for
making suggestions and doing some testing for me.
[And I would like to thank John McCombs for writing snews in such a
way that modifying it to work with KA9Q was very easy. GT]
Version 1.90 Acknowledgements
-----------------------------
First of all, thanks to John McCombs for allowing us to modify his
code. A great little program that we hope to make just a touch
better.
To all people who made suggestions and bug reports up to this
point, you guys are too numerous to mention. Thanks one and all.
FILES AND DIRECTORIES
=====================
NEWS BASE DIRECTORY - This is the top level directory for Simple NEWS.
the active file and the users rc files are kept here. This directory
is defined by the environment variable snews
*.NRC - These files have a list of the articles which a user has
seen. The name of the file is derived from the 'mailbox' variable,
for example my news rc file would be 'john.nrc'. The nrc files are
kept in the news base directory.
The nrc files are created and maintained automatically by the news
reader and should not be edited by hand. If one becomes corrupted,
just delete it.
* NOTE: The 'mailbox' variable now has to be declared in the
SNEWS.RC file. See the section at the end of this file (or the
sample SNEWS.RC file) for more info.
HISTORY - The history file contains a list of the message-id's of all
the cross-posted articles in the database. It is used by the
news-reader to find all the instances of a cross-posted article,
The file fields are message-id, received date in seconds (Unix date),
newsgroup name & article number for each instance of the article.
The history entries are added by 'unbatch' and deleted by 'expire'.
ACTIVE - The active file contains a list of the newsgroups we expect to
get. The format is defined under installation, below. All articles
to newsgroups not defined in the active file are posted to junk.
You MUST use 'addgroup' and 'rmgroup' to maintain the active file.
DON'T use and editor on it.
The active file is in the news base directory.
NG - This file is a list of newsgroup names, one per line, that you
can post to. You can post only to groups listed in this file. The
newsgroups file is in the news base directory. If you want to
prevent anyone posting, simply remove the ng file.
NEWSPOST.TXT - This file, which is in the ka9q incoming mail directory,
is a log of all postings. You can read this file with 'mail' and the
default name can be set in the snews.rc file.
ARTICLES - these are placed in files in a directory called 'newsbase'
which is a sub-directory of the news base directory. There is one text
file and one index file for each newsgroup. The name of the text file
is found in the second field of the corresponding entry in the active
file. For example if the news base directory is d:\nos\spool\snews
then articles in comp.sys.ibm.pc might be in a file called:
d:\nos\spool\snews\newsbase\87297243
and the index file will be
d:\nos\spool\snews\newsbase\87297243.IDX
Don't change these files by hand - use expire to do the deletion,
to keep the active file in sync. Use 'addgroup' to create them
and 'rmgroup' to remove them.
INDEX FILES - Each newsgroup has an index file which has information
about the articles in that newsgroup. The format is
00000000 00000001 687297893 Re: senior (humph!)
00001927 00000002 687297893 need rx02 controller.
00002801 00000003 687297893 Re: senior (humph!)
00003707 00000004 687297893 Another dumb luser story
The first field is the offset of the article in the text file. The
second field is the article number. The third field is the date/time
that the article was added to the database, and the fourth field
is the article subject. This latter field is used by the newsreader
to build the threads.
INCOMING NEWS BATCHES - These are placed by KA9Q in the directory
<KA9Q base dir>\spool\articles. Unbatch processes the
batches from this directory, and deletes them when done. NB: all
files in this directory are assumed to be news batches and will be
processed by the unbatch program. Reserve this directory
exclusively for incoming news batches.
EXE Files - These can be placed in any directory that is included
in the PATH statement. They are unbatch.exe, snews.exe, expire.exe
addgroup.exe rmgroup.exe and reindex.exe.
INSTALLATION
============
Installation is easy.
0. First get KA9Q going and delivering news batches into the
'incoming' directory. The incoming directory
*must* be reserved solely for this purpose, and it must have
no files in it, other than the news batches that KA9Q will
create there.
1. Put "set SNEWS=<KA9Q base dir>\spool\snews" in your autoexec.bat.
This is the 'root' directory for your news system. The 'active',
'ng', 'snews.rc' etc files are placed here and the news database
is a subdirectory of this directory.
2. Edit the sample 'snews.rc' file to fit your own configuration.
See the comments contained therein for what you need to do.
Copy 'snews.rc' to the same directory as the active file.
This file has been separately created to accomodate the new
variables that can be set for SNEWS.
The variables that may be set in this file are:
Name=Joe Bloggs - Your "real" name
Signature=a.sig - Signature file (in home directory)
Organization= This here Company Ltd
* Replyto=whoami@this.system - A Reply-To address
that will be included in posted article headers.
Previous versions of SNews did not use this
variable.
Editor=q %s - Editor to be used for entering articles.
Newsserver=The name of the news server
Nodename=The name of your system
Newsdir=The fully qualified name of the path for news batches
Domain=The name of the domain to which you belong
Userid=Your user name
Home=The home directory for the ka9q files
Mailqueue=The fully qualified name of the outgoing mail queue
directory
Quotemark=The line prefix for quoted messages
* Mailuser=The name of the pseudo user to receive the posting log
* Extracts=The name of the pseudo user to receive extracts
* These new colour variables define the LOOK of your system, and
allow people on monochrome systems to define the screen output
differently from colour-screen users.
color helpf <col> - Help screen foreground
color helpb <col> - Help screen background
color textf <col> - Text window foreground
color textb <col> - Text window background
color headb <col> - Screen header background
color headf <col> - Screen header foreground
color msgb <col> - Message line (bottom) background
color msgf <col> - Message line foreground
* <col> can be of the following colours:
whi - grey note: the shortened names do not have
bla - black to be used - only the first 3
blu - blue letters of the colour are checked.
gre - green
red - red
mag - magenta
cya - cyan
yel - yellow
add "+" to the end of these and you will get the high intensity
version of the same colour. eg: whi+ = white cya+ = light cyan
and so on. Fiddle round with it till you get the colours you want.
A sample SNEWS.RC file is included. (See it for more
documentation on how to customise SNEWS.)
3. Create the 'ng' newsgroups file in the same directory as the active
file. This file should contain the names of the newsgroups that
you wish to be able to post in. As a minimum you probably want
the groups in your active files, less the names of the moderated
groups. The file 'ng' looks like this:
alt.angst
alt.aquaria
alt.artcom
alt.astrology
alt.atheism
An example 'ng' file is included.
* Addgroup (see later) will automatically add newsgroups to the
ng file as they are added to the newsbase. If you do not wish Snews
to allow posting to a group, it must be deleted from the ng file by
hand.
4. Create the 'active' file in this directory, using 'addgroup'.
For example:
addgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc
Each entry has the form of "alt.sources 87297268 00000000 00000000 y".
The first number is the filename of the file where the articles are
stored. The next two numbers are the the lowest article number
(minus 1) and the highest article number, respectively.
The three numbers MUST be EXACTLY 8 digits long with EXACTLY one space
between them. The last field is ignored.
An example 'active.bat' file is included.
ADDGROUP should be run from a batch file, so that you can easily
re-initialise the news system should the need ever arise.
5. Edit the makefile and run it, and/or put the exe files in the
DOS PATH.
6. Call your host and get some news. Copy some of these batches into
another directory, so that you can use them again for testing
purposes.
Run 'unbatch'. This is where most problems occur. Check:
- That your disk is not full.
- Look in 'batch.txt' with an editor. You should see news
articles separated by the string '#! rnews [<number>]'.
If you run KA9Q from a batch file, put "unbatch" as the last command.
Once you have done this you should have your batches processed
automatically after transfer. Use SNEWS to read your news, and
run expire once in a while to deleted the old stuff. You could
stick the expire in your autoexec file.
Help!
-----
In general you should not edit/delete the active file or the news
database files by hand. Use only addgroup/rmgroup/unbatch/expire
for these tasks.
The history and *.nrc files should not be edited by hand, but
deleting them is not fatal. If they get corrupted, just delete
them.
The active file, article text files and index files are all checked
to ensure that they stay in sync. If something gets corrupted you
can probably fix the problem by using reindex or rmgroup to delete the
affected group, then using addgroup to put it back. The most likely
cause of this problem is 'unbatch' or 'expire' crashing.
If things get really messed up your only option may be to re-init the
news system.
You cannot post articles without a valid 'ng' file. You can only
post to newsgroups listed in the 'ng' file.
SNEWS - NEWS READER
===================
SNEWS is a threaded news reader, somewhat reminiscent of TASS. The
display has three levels, choose a newsgroup, choose a thread, and
read an article. At each level the Home/End/PgUp/PgDn/UpArr/DnArr
can be used to move around. ENTER selects whatever you are
pointing at, and TAB moves you to the next unread group/article.
To read the all of a thread (read and unread) keep hitting ENTER.
ESCAPE takes you back a level.
'h' invokes a help screen, 'c' marks all articles in a group as read.
'p' posts an article, from any level.
* F1 also calls up the help screen (added for standardisation purposes)
* F2 now displays the values set via the SNEWS.RC file.
When reading an article 'r' and 'f' allow a mail reply and a news
followup of the current article, respectively. You are given the
option of quoting the article. 'x' toggles a rot13 conversion of the
article. PgUp from the start of the article will display all the
headers.
The above commands are case sensitive.
SNEWS maintains a list in the user's .nrc file of which articles have
been seen.
In the group and thread levels the number of unread articles, if any,
is displayed, followed by the total number of articles, in brackets,
for each group/thread.
The threads are constructed in the order that the articles were unbatched
which is usually pretty close to the chronological order.
* Snews allows stepping forward and backward through articles now.
Using the right arrow key will take you to the next article in the
current thread, while the left arrow takes you to the previous
article.
When you read a cross-posted article, all the other instances of that
article, in the other newsgroups, are also marked as read. This saves
you having to sort out which articles you have previously seen. If
you use 'c' to mark all the articles in a group as read, the instances
of cross-posted articles in other groups are *not* marked.
Free memory is shown in [] at the top of each page. You'll probably
have a hard time using it all up. (Don't you believe it !!! [MSM])
Posting
-------
You can only post to newsgroups listed in the 'ng' file in the news base
directory. If a newsgroup name is in the 'active' file, but not in the
'ng' you will not be able to post to that group. This is a suitable way
to prevent posts to a moderated group.
A copy of each post is saved in a file called 'newspost.txt' in the ka9q
incoming mail directory. This file may be perused using mail. The name
of this file can be configured in snews.rc
UNBATCH
=======
Just run it. It looks for work in the <ka9q>/spool/articles directory,
and tosses the articles into the files defined in the active file.
News batches are removed as they are successfully processed.
The options are "-j -v ". -j causes unbatch not to place articles in
junk unless there are no other active newsgroups in which to place the
article, -v causes unbatch to show it's progress as it works.
EXPIRE
======
Expire takes one argument, the number of days.
expire 5
will delete articles 5 days or older from the news database.
Expire will give you summary of the number of articles and size
of the remaining news database, and of the articles deleted.
Alternately expire can read a data file of expiry times for newsgroups
examine the file expire.dat for the format and entries required in this
file. To use use selective expire, start expire without any parameters
ensuring that the 'expire.dat' file is in the snews base directory. (The
same directory as snews.rc)
Expire can also optionally process the ka9q history file when used
selectively. Two options are available as set in expire.dat.
1) Retain only the last x lines in the file. 2) Copy the snews
history file into the ka9q history file. Refer to the sample expire.dat
file for details.
ADDGROUP
========
The 'addgroup' utility is used to create or add groups to the active
file. For example:
addgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc
will add these groups, creating an new active file if none exists.
The newsgroup files in the 'newsbase' directory are also created.
Each group added to the newsbase is also added to the ng file.
RMGROUP
=======
To remove a newsgroup, simply run rmgroup, followed by the newsgroup
names. For example
rmgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc
This will remove the files and delete the entry from the active file.
The 'ng' newsgroups file is unaffected.
-------------------------------------------------------------------------
SNEWS 1.90 ADDITIONS
====================
- SNEWS now uses a file SNEWS.RC. It no longer supports the
PERSONAL.RC file. A DOS variable SNEWS must be set up and
point to the SNEWS.RC file.
- The help function in SNEWS can now be called with either the
"h" key or by pressing F1.
- The F2 key lists all "important" variables as set via the
SNEWS.RC file.
- SNEWS now supports color definition in the SNEWS.RC file. You
can alter the look of the various screen parts' colours. See
the section above on color (or the sample SNEWS.RC file) for
more information.
- SNEWS threaded newsreading can now be done by using the right
and left arrow keys to step forwards AND back through a thread.
- SNEWS' posting of email and articles is made a little bit more
user-friendly. After creating and editing an email/article, the
user can now (S)end it, (E)dit it again, or (A)bort it. Also,
when emailing a reply, the destination email address will be
displayed above the "Send/Edit/Abort" msg to ensure correct
addressing. Articles can also have the (D)istribution modified
or a (F)ollowup line added.
--
Good luck and may the News be with you